<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="c1" width="600" height="600"></canvas>

    <script>
        // 获取画布
        var c1 = document.getElementById("c1")
        // 获取画笔
        let ctx = c1.getContext("2d")

        /**
         * 绘制圆弧
         * arc是绘制圆弧的方法
         * ctx.arc(圆心x，圆心y，半径，开始绘制的角度，结束绘制的角度，逆时针绘制还是顺时针绘制[默认是顺时针false])
         */
        ctx.arc(100, 100, 50, 0, Math.PI*2, true)
        ctx.stroke()
    </script>
</body>
</html>